package com.lx.zxs.service;

import com.lx.zxs.entity.Video;
import com.lx.zxs.mapper.VideoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class VideoService {
    @Autowired
    private VideoMapper videoMapper;

    public List<Video> findVideoByPage(Integer currentPage, String vType) {
        return videoMapper.findVideoByPage((currentPage-1) * 6,6,vType);
    }

    public Map getVideoCount(String vType) {
        return videoMapper.getVideoCount(vType);
    }
}
